package com.wzu.springbootcrud2.service;

import com.wzu.springbootcrud2.dao.Timingdao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Component
public class TimingService implements Timingdao {

    @Autowired
    AsynService asynService;



    @Scheduled(cron = "0/100 * * * * ?")
    public void send(){
        asynService.sendEmail();
    }
}
